﻿using System;
using System.Collections.Generic;
using Abp.Runtime.Validation;
using pandx.Mulan.Dto;

namespace pandx.Mulan.Authorization.Roles.Dto
{
    public class ObtainRolesInput:PagedSortedAndFilteredInput,IShouldNormalize
    {
        public List<string> Permissions { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public List<bool> IsStatic { get; set; }
        public List<bool> IsDefault { get; set; }

        public void Normalize()
        {
            
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime DESC";
            } 

            Filter = Filter?.Trim();
        }
    }
}

